<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AddWorkflowType2ToWorkflowV2TemplatesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('workflow_v2_templates', function (Blueprint $table) {
            $table->unsignedInteger('workflowType2')->default(0)->comment('工作流类型2')->after('workflowType');
            $table->unsignedSmallInteger('sort')->default(0)->comment('排序')->after('status');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('workflow_v2_templates', function (Blueprint $table) {
            $table->dropColumn('workflowType2');
            $table->dropColumn('sort');
        });
    }
}
